package com.xujinchen.operator;

public class Demo05 {
    public static void main(String[] args) {
        //与 或 非
        boolean a=true;
        boolean b=false;

        System.out.println("a&&b:"+(a&&b));//逻辑与运算
        System.out.println("a||b:"+(a||b));//逻辑或运算
        System.out.println("!(a&&b):"+!(a&&b));

        //短路运算
        int c = 5;
        boolean d =(c<4)&&(c++<4);
        System.out.println(d);
        System.out.println(c);
    }
}

